import React, { Component, } from 'react-native'
import { createStore, applyMiddleware, } from 'redux'
import { Provider, } from 'react-redux'
import thunk from 'redux-thunk'

import rootReducers from './reducers'
import App from './containers/App'

const createStoreWithMiddleware = applyMiddleware(thunk)(createStore)
const store = createStoreWithMiddleware(rootReducers, {})

export default class Main extends Component {
  render() {
    return (
      <Provider store={store}>
        <App />
      </Provider>
    )
  }
}
